*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*	This is the Master program for cleaning the Denver raw data.
*	----------------------------------------------------------------------------

	clear all
	set more off
	set maxvar 	32767
	set matsize 11000

*	paths

	global rawdata 				"${data_raw_DEN}"
	global cleandata 			"${data_clean_DEN}"

*	switches

	local enrollment 	1		//clean enrollment files
	local tests		 	1		//clean test files
	local match			1		//clean match files
	local pscores		1		//compute pscores
	local compile		1		//construct base file from the above

*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

*	do

	//	[raw] -> enrollment_long
	if `enrollment' 	do "${code_clean_DEN}c_enrollment"

	//	[raw] -> tests
	if `tests' 		 	do "${code_clean_DEN}c_tests"

	//	[raw] -> match_{2013-2017}
	if `match' 		 	do "${code_clean_DEN}c_match"

	//	match_{2013-2017} -> pscores
	if `pscores' 	 	do "${code_clean_DEN}c_pscores"

	//	enrollment_long + tests + NSC + pscores -> denver_basefile
	if `compile' 	 	do "${code_clean_DEN}c_compile"
